package com.theo.service;

import com.theo.entity.CityInfo;
import com.theo.entity.DailyEpidemicInfo;
import com.theo.entity.EpidemicDetailInfo;
import com.theo.entity.EpidemicInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 方涛
 * @since 2021-02-02
 */
public interface EpidemicInfoService extends IService<EpidemicInfo> {
    /***
     * 保存当日的疫情数据，返回还未录入数据的省份列表
     * @param dailyEpidemicInfo
     * @return
     */
    List<CityInfo> saveEpidemicInfo(DailyEpidemicInfo dailyEpidemicInfo);

    /***
     * 获取最新疫情数据
     * @return
     */
    List<EpidemicDetailInfo> findLastestData();


    List<EpidemicDetailInfo> findLastestGlobalData();
    /***
     * 查询某天的所有数据
     * @param date
     * @return
     */
    List<EpidemicDetailInfo> findAllData(String date);

    /***
     * 查询所有数据
     * @return
     */
    List<EpidemicInfo> findAll();

    /***
     * 根据日期查询所有数据
     * @param date
     * @return
     */
    List<EpidemicInfo> findAllByDate(String date);

    EpidemicInfo queryEpidemicInfoById(Integer id);

    void deleteDataById(Integer id);

    void updateData(EpidemicInfo epidemicInfo);

    List<EpidemicInfo> selectDataForChart();

    List<EpidemicInfo> selectDataForGlobalChart();
}
